package com.example.demo.service;

import com.example.demo.entity.Hospital;
import com.example.demo.mapper.HospitalMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HospitalService {
    @Autowired
    private HospitalMapper hospitalMapper;

    public List<Hospital> getHospitalByName(String name) {
        return hospitalMapper.selectHospitalByName(name);
    }
    public List<Hospital> getAllHospital() {
        return hospitalMapper.selectHospital();
    }
}
